﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using System.Windows.Forms;
using VAdvantage.DataBase;
using VAdvantage.Controls;
using System.Data.SqlClient;
using System.Data;
using VAdvantage.Classes;
using VAdvantage.Common;
using System.Threading;
using VAdvantage.Model;
using VAdvantage.Process; using VAdvantage.ProcessEngine;

namespace VAdvantage.Classes
{


    /// <summary>
    /// ID Column for MiniGrid allows to select a column and maintains the record ID
    /// </summary>
    public class IDColumn
    {
        /// <summary>
        /// IDColumn constructor
        /// </summary>
        /// <param name="record_ID">record id</param>
        public IDColumn(int Record_ID)
        {
            SetRecord_ID(Record_ID);
            SetSelected(false);
        }   //  IDColumn

        /** Is the row selected         */
        private bool _Selected = false;
        /** The Record_ID               */
        private int _Record_ID;


        /// <summary>
        /// Set Selection
        /// </summary>
        /// <param name="selected"></param>
        public void SetSelected(bool selected)
        {
            _Selected = selected;
        }

        /// <summary>
        /// Get selected status
        /// </summary>
        /// <returns>true, if selected</returns>
        public bool IsSelected()
        {
            return _Selected;
        }


        public void SetRecord_ID(int record_ID)
        {
            _Record_ID = record_ID;
        }

        public int GetRecord_ID()
        {
            return _Record_ID;
        }

        public override String ToString()
        {
            return "IDColumn - ID=" + _Record_ID + ", Selected=" + _Selected;
        }   //  toString

    }   //  IDColumn
}